package net.uzen.office.common.validator;

import net.uzen.office.account.model.Account;

import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;

public class SignInValidator implements Validator {

	@Override
	public boolean supports(Class clazz) {
		return Account.class.isAssignableFrom(clazz);
	}

	@Override
	public void validate(Object obj, Errors errors) {
		ValidationUtils.rejectIfEmpty(errors, "userID", "required",
				"Field is requried");
		// ValidationUtils.rejectIfEmpty(errors, 필드명, message 코드, default
		// message");
	}
}
